-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIXED] Consumer fixes and improvements on state management. #3892
Conversation
General code cleanup to be more correct. Signed-off-by: Derek Collison <derek@nats.io>
Make sure to update ack floors on messages being expired out from underneath of us. Signed-off-by: Derek Collison <derek@nats.io>
Signed-off-by: Derek Collison <derek@nats.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few nits around tests.
Leaving as a comment to not block merge if I'm already asleep when fixed as those are just nits.
|
||
// Ack all again | ||
for _, m := range msgs { | ||
m.Ack() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably check error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Async, so no error will be propagated and the we do flush and the checks below on consumer info guarantee the acks were processed.
Signed-off-by: Derek Collison <derek@nats.io>
83a68ba
to
3c64d07
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Make sure to also cleanup pending if below our stream ack floor.
Make sure to clean up redelivered state on purge.
Make sure to update ack floors on messages being expired out from underneath of us.
Fixed bug that would lose ack pending state during partial stream purge.
Make sure we warn properly of consumer state update failures.
Signed-off-by: Derek Collison derek@nats.io
/cc @nats-io/core